<!--
**********************************************************
* @Author: 张小平
* @Date:   2024-05-01
* @Email:  qqshuqian@163.com
* @Last modified: 最后修改日期
* @Description: 文件描述
**********************************************************
-->
<template>
  <div v-html="html" :style='style'>
  </div>
</template>
<script>

import { convertHtmlByParam} from '@/framework-core/utils/util'
export default {
    name: 'caption',
    props: ['column'],
    inject: ['getViewFormData'],
    data() {
        return {
            style: ''
        }
    },
    mounted() {
        if (!this.column) {
            return "";
        }
        this.style = 'background: ' + this.column.backgroundColor + ';font-size:' + this.column.fontSize + ';line-height: ' + this.column.lineHeight
    },
    computed: {
        html() {
            if (!this.column) {
                return "";
            }
            var formData = {};
            if (this.getViewFormData) {
                formData = this.getViewFormData()
            }
            var query = this.$route.query;
            return convertHtmlByParam(this.column.value, formData, query)
        }
    },
    methods: {

    },
    created() {

    }
}
</script>
 <style lang="scss">

</style>
